﻿@namespace Masa.Blazor.Presets
@using Masa.Blazor.Presets.EnqueuedSnackbars
@inherits BDomComponentBase

<div class="@CssProvider.GetClass()" style="@CssProvider.GetStyle()">
    <CascadingValue Value="this">
        @foreach (var config in _stack)
        {
            <PSnackbar @key="config"
                       EnqueueId="@config.Id"
                       Title="@config.Title"
                       Content="@config.Content"
                       Type="@config.Type"
                       Timeout="@config.Timeout"
                       Closeable="@config.Closeable"
                       ActionText="@config.ActionText"
                       ActionColor="@config.ActionColor"
                       OnAction="@config.OnAction">
            </PSnackbar>
        }
    </CascadingValue>
</div>
